home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d17 / slash0.arc / SLASH0.BAS < prev    next >
BASIC Source File  |  1990-01-20  |  5KB  |  92 lines

  1. 1 REM SLASH0.BAS by E.C. Weber  Copyright 1989 All Rights Reserved
  2. 2 REM For a visually better program, any line that reads
  3. 3 REM             REM CLEAR SCREEN CODE CLS
  4. 4 REM should be replaced by the appropriate code to clear the screen.
  5. 5 REM Since this code in MSDOS and TRSDOS BASIC is CLS, simply delete
  6. 6 REM the first four words leaving the CLS.
  7. 7 REM For AppleSoft BASIC, convert the LPRINTS to the appropriate commands.
  8. 8 REM  To test the program, temporarily remove the REM in line 530
  9. 100 REM **************** Get Style, Size, Normal/Compressed ***********
  10. 110 REM Clear Screen Code CLS
  11. 130 FOR X=1 TO 35:PRINT "=-";:NEXT X:PRINT "="
  12. 140 PRINT"SLASH0.BAS                      by E.C. Weber                     c1989"
  13. 150 FOR X=1 TO 35:PRINT "=-";:NEXT X:PRINT "=":PRINT
  14. 160 PRINT"Answer the following questions by pressing  the key corresponding to"
  15. 170 PRINT "the letter in angle brackets."
  16. 180 PRINT
  17. 190 PRINT "Which Font?  <R>oman   <S>ans Serif   <D>raft  "
  18. 200 FONT$ = INKEY$: IF FONT$="" THEN 200
  19. 210 IF FONT$<>"R" AND FONT$<>"r" AND FONT$<>"S" AND FONT$<>"s" AND FONT$<>"D" AND FONT$<>"d" THEN PRINT "illegal response - do again  ":GOTO 200
  20. 220 PRINT
  21. 230 PRINT "Which Pitch?  <1> 10 CPI     <2> 12 CPI";
  22. 240 IF FONT$<>"D" AND FONT$<>"d" THEN PRINT "      <3> PS" ELSE PRINT
  23. 250 PITCH$=INKEY$:IF PITCH$="" THEN 250
  24. 270 REM **** lines 300, 310, 320 check the validity of the pitch input *****
  25. 280 REM **** there is no draft ps, so pitch$="3" would not be valid ******
  26. 290 REM **** if these lines cause trouble in your BASIC, remove them ******
  27. 300 TEST1%=((FONT$="D") OR (FONT$="d"))+((PITCH$<>"1") AND (PITCH$<>"2"))
  28. 310 TEST2%=(PITCH$<>"1")+(PITCH$<>"2")+(PITCH$<>"3")
  29. 320 IF TEST1% =-2 OR TEST2%=-3 THEN PRINT "illegal response - do again":GOTO 250
  30. 330 PRINT
  31. 340 PRINT"<N>ormal or <C>ompressed?   "
  32. 350 SIZE$=INKEY$:IF SIZE$="" THEN 350
  33. 360 IF SIZE$<>"N" AND SIZE$<>"n" AND SIZE$<>"C" AND SIZE$<>"c" THEN PRINT "illegal response - do again  ":GOTO 350
  34. 370 PRINT:LINE INPUT"Enter a number to set the left margin (default=10):  ";MARGIN$
  35. 380 IF MARGIN$="" THEN MARGIN$="10"
  36. 390 MARGIN%=VAL(MARGIN$)
  37. 400 IF MARGIN%>79 THEN PRINT"illegal value":GOTO 370
  38. 410 LPRINT CHR$(27)"@";
  39. 420 LPRINT CHR$(27);CHR$(108);CHR$(MARGIN%);:   REM set left margin
  40. 430 PRINT:PRINT "Downloading.....";
  41. 440 IF PITCH$="1" THEN LPRINT CHR$(27);"P";:PRINT"10 CPI";
  42. 450 IF PITCH$="2" THEN LPRINT CHR$(27);"M";:PRINT"12 CPI";
  43. 460 IF PITCH$="3" THEN LPRINT CHR$(27);CHR$(112);CHR$(1);:PRINT"PS";
  44. 470 IF FONT$="D" OR FONT$="d" THEN GOSUB 1000
  45. 480 IF FONT$="S" OR FONT$="s" THEN GOSUB 2000
  46. 490 IF FONT$="R" OR FONT$="r" THEN GOSUB 3000
  47. 500 IF SIZE$="N" OR SIZE$="n" THEN LPRINT CHR$(16);:PRINT" Normal";
  48. 510 IF SIZE$="C" OR SIZE$="c" THEN LPRINT CHR$(15);:PRINT" Condensed";
  49. 520 LPRINT CHR$(27)"%"CHR$(1);
  50. 530 REM LPRINT "12345678900000000"
  51. 540 PRINT" Slashed Zero"
  52. 550 END
  53. 1000 REM ********************* DRAFT ******************
  54. 1010 PRINT" Draft";
  55. 1020 LPRINT CHR$(27);"x0";
  56. 1030 LPRINT CHR$(27);":";CHR$(0);CHR$(0);CHR$(0);:   REM load rom into ram
  57. 1040 LPRINT CHR$(27);"&";CHR$(0);"00";  :REM state characters to be downloaded
  58. 1050 LPRINT CHR$(1);CHR$(9);CHR$(2);    :REM number of bytes to be downloaded
  59. 1060 REM RESTORE 1100  see line 4030
  60. 1070 FOR X% = 1 TO 27
  61. 1080 READ BYTE%:LPRINT CHR$(BYTE%);
  62. 1090 NEXT X%
  63. 1100 DATA 1,253,0,6,2,192,8,4,32,16,8,16,8,16,32,16,32,16,8,64,32,6,128,192,1,127,0
  64. 1110 RETURN
  65. 2000 REM ***********************SANS SERIF *****************
  66. 2010 PRINT" Sans Serif";
  67. 2020 LPRINT CHR$(27);"x";CHR$(1);
  68. 2030 LPRINT CHR$(27);"k";CHR$(1);
  69. 2040 LPRINT CHR$(27);":";CHR$(0);CHR$(1);CHR$(0);
  70. 2050 GOSUB 4000
  71. 2060 RETURN
  72. 3000 REM ***********************ROMAN *****************
  73. 3010 PRINT" Roman";
  74. 3020 LPRINT CHR$(27);"x1";
  75. 3030 LPRINT CHR$(27);"k0";
  76. 3040 LPRINT CHR$(27);":";CHR$(0);CHR$(0);CHR$(0);
  77. 3050 GOSUB 4000
  78. 3060 RETURN
  79. 4000 REM **************** LQ Character Definition ***************
  80. 4010 LPRINT CHR$(27);"&";CHR$(0);"00";
  81. 4020 LPRINT CHR$(3);CHR$(23);CHR$(3);
  82. 4030 REM line 4050 sends the data for the draft character to the bit bucket
  83. 4040 REM if your BASIC supports it, change line 4050 to RESTORE 4090
  84. 4050 FOR X%=1 TO 27:READ NOTNEEDED%:NEXT X%
  85. 4060 FOR X%=1 TO 69
  86. 4070 READ BYTE%:LPRINT CHR$(BYTE%);
  87. 4080 NEXT X%
  88. 4090 DATA 1,255,0,2,0,128,5,255,64,10,0,160,4,3,64,24,0,48,0,6,0,16,0,16,32,12
  89. 4100 DATA 8,16,0,16,32,24,8,16,0,16,32,48,8,16,0,16,32,96,8,16,0,16,0,192,0
  90. 4110 DATA 24,0,48,5,128,64,10,0,160,5,255,64,2,0,128,1,255,0
  91. 4120 RETURN
  92.